// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'


import './lib/ztree/css/zTreeStyle/zTreeStyle.css'
import './lib/ztree/css/metroStyle/metroStyle.css'
import './lib/ztree/js/jquery.ztree.all.min'

import './assets/iconfont/iconfont'
import util from './lib/util'
import './assets/normalize.css'
import './assets/common.css'

import store from './store'

import VECharts from 'vue-echarts'
Vue.component('chart', VECharts)

import EchartsJs from 'echarts'//水波球需要
Vue.prototype.$echarts = EchartsJs;

import htmlToPdf from './lib/util/htmlToPdf'
Vue.use(htmlToPdf)

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);

import validate from 'zy-validate/dist/zy-validate.js'
Vue.use(validate)

import {Notification} from 'element-ui'
window.$notify=Notification


Vue.use(util)
Vue.config.productionTip = false

router.beforeEach((to, from, next) => {
  // 统计代码
  if (to.path) {
    _hmt.push(['_trackPageview', '/#' + to.fullPath]);
  }
  next()
})

var data={config:{},eventHub: new Vue()};
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  data:data,
  template: '<App/>',
  components: { App },
  store
})
